/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.goods;

import com.enation.app.javashop.client.goods.GoodsQuantityClient;
import com.enation.app.javashop.core.client.fallback.goods.GoodsQuantityClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.goods.vo.GoodsQuantityVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * 商品库存操作客户端
 *
 * @author zh
 * @version v7.0
 * @date 18/9/20 下午7:31
 * @since v7.0
 */
@FeignClient(name = "goods-service", fallbackFactory = GoodsQuantityClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface GoodsQuantityClientFeignImpl extends GoodsQuantityClient {
    /**
     * 库存的操作
     *
     * @param goodsQuantityList 要扣减的库存vo List
     * @return 是否扣减成功
     */
    @Override
    @RequestMapping(value = "/client/goods/add-quantity", method = RequestMethod.POST, consumes = "application/json")
    boolean updateSkuQuantity(@RequestBody List<GoodsQuantityVO> goodsQuantityList);
}
